calendar-server: Use the actual recurrence ID of events
Instead of querying the client for a list of objects and using
e_cal_recur_generate_instances() to get occurrences for each of
them, we can use e_cal_client_generate_instances_sync() which
combines the functionality of both functions. This doesn't only
save us some lines of code (yay!), but also gives us access to
the real recurrence ID of an event, so we can get rid of the hack
of faking one.
calendar-server: Get recurrence ID from occurrences
We use the triplet of source ID, UID and recurrence ID to create
an ID to unambiguously identify an event, which we use to implement
hiding dismissed events from the calendar. However we currently
try to fetch the recurrence ID from the objects returned by
e_cal_client_get_object_list_sync(), which are always the primary
events with no recurrence ID. Instead, we need a recurrence ID
associated with each occurrence.
calendar: Do not overload :active to mark selected day
We currently use the :active pseudo class to mark the selected day
in the calendar. Whenever the selected date changes, the class is
added to the corresponding button and removed from all others.
However when the selected date doesn't change (i.e. when clicking
the already selected date), the buttons are not updated and the
use of the :active class conflicts with StButton's builtin handling
of the class - the class is removed on the button up event and the
button is deselected.
Fix this by simply using a different pseudo class.
calendar: Refresh calendar when ignored events changes
The last patch fixed marking days in the calendar where all
events are ignored, but it doesn't pick up the change when
an event is hidden. Emit an appropriate change notification
to fix this issue.
calendar: Move handling of ignored events to event source
Ignoring events is currently implemented in the message list's
event section, which means that the calendar does not consider
ignored events when marking days with events. In order to fix
this, move the handling of ignored events to the event source,
which is shared between both components.
Florian Müllner [Tue, 21 Jun 2016 17:46:44 +0000 (19:46 +0200)]
osdWindow: Use a constraint to enforce ratio
Commit 9b07ce1d0d broke the code that keeps the OSD window square.
Use that opportunity to move away from the hack of setting the
min-height style property from code and adjusting the width on
allocate, and implement a proper constraint instead.
ClutterActor:width is a floating point property, so it will not be
automatically rounded to non-fractional values that properly align
to pixels. To fix the resulting blurriness, add explicit rounding.
Florian Müllner [Fri, 3 Jun 2016 23:29:07 +0000 (01:29 +0200)]
osdWindow: Fix level bar width
Commit 9b07ce1d0d changed the OSD window's level bar to be a regular
actor instead of a custom drawn bar. The bar actor's width depends on
both the configured level (e.g. 40%) and the available width, however
the width is currently only updated when the configured level changes.
Fix that by properly considering changes to the parent's width as well.
overview: Move ::scroll-event signal handling (again)
Commit c39ffa111 moved the signal handling from the controls- to the
background-group to enable scrolling on non-primary monitors.
However this broke scrolling on reactive overview elements as the
workspace switcher, as they're not descendants of the background.
To fix, move scroll-event handling to the overview group itself,
which is the common ancestor of all overview elements.
Owen W. Taylor [Thu, 4 Feb 2016 18:13:13 +0000 (13:13 -0500)]
Restart: fix maximized windows flickering to the wrong struts
When we restart, we need to update the struts for the screen before
we enter the main loop, or maximized windows will get resized to the
size of the screen without struts, then resized back.
A workaround is needed for a Clutter bug that occurs when we get
the size of an actor before the first paint of the stage.
Hyungwon Hwang [Fri, 10 Jun 2016 10:34:48 +0000 (19:34 +0900)]
background: free MetaBackground explicitly when its MetaBackgroundActor is destroyed
The memory which MetaBackground resides is freed automatically, when its
wrapper object Background is freed by garbage collection. But because the
memory for MetaBackground is huge, changing the background or changing the
background mode repeatedly makes a lot of memory to be in use until garbage
collection runs.
This patch frees the MetaBackground object explicitly when its
MetaBackgroundActor is destroyed which is the moment that the memory in the
object is not used anymore.
Rui Matos [Sun, 29 May 2016 17:42:25 +0000 (19:42 +0200)]
screenShield: Stop using an offscreen buffer for the arrow actor
This isn't a performance critical actor and the NVIDIA driver discards
offscreen buffers in some cases which would require us to go through
extra hoops to handle here which isn't worth it.
Rui Matos [Mon, 6 Jun 2016 18:28:34 +0000 (20:28 +0200)]
shell-recorder: Avoid a crash when the cursor texture is NULL
When running as a wayland compositor, MetaCursorTracker might
legitimately not have a displayed cursor because e.g. a client unsets
the cursor surface.
Note that, under an X session, the assumption that the tracker always
has a cursor texture is true because XFixesGetCursorImage() always
returns data even if the cursor isn't visible.
Florian Müllner [Fri, 24 Jun 2016 16:19:40 +0000 (18:19 +0200)]
workspacesView: Consider workspaces-only-on-primary when panning
It is odd to switch workspaces on the primary monitor when panning on
a monitor without workspaces, so reject the gesture on non-primary
monitors when workspaces-only-on-primary is disabled.
Florian Müllner [Thu, 26 May 2016 16:51:30 +0000 (18:51 +0200)]
workspacesView: Consider workspaces-only-on-primary when scrolling
It is odd to switch workspaces using the scroll wheel when the pointer
is on a monitor without workspaces, so only handle scroll events on
non-primary monitors when workspaces-only-on-primary is disabled.
Florian Müllner [Fri, 24 Jun 2016 16:15:48 +0000 (18:15 +0200)]
workspacesView: Allow activating empty workspaces on any monitor
We allow activating a workspace by clicking it when we know that
the user did not try to select a window and missed (namely: the
workspace is empty). However we currently always check for an
empty workspace on the primary monitor, which doesn't make sense
when the click happened on a different monitor.
Florian Müllner [Thu, 26 May 2016 16:20:25 +0000 (18:20 +0200)]
overview: Move overview actions and scrolling to background group
Both the Overview::scroll-event and actions added via addAction()
are meant to work anywhere in the overview, but for now only work
on the primary monitor. Move the handling to the background group
that is known to span all outputs to fix.
Florian Müllner [Fri, 24 Jun 2016 13:45:03 +0000 (15:45 +0200)]
overview: Remove stack actor
The stack was used to overlay a message indicator over the overview
group. That indicator is long gone, so there's no longer a need for
an intermediate actor in the hierarchy.
Rui Matos [Sun, 26 Jun 2016 17:09:41 +0000 (19:09 +0200)]
workspacesView: Initialize the adjustment's upper bound
Initializing the upper bound to zero means that on panning we'd start
scrolling from the first workspace even if the current workspace when
entering the overview was different since StAdjustment clamps the
value to be inside bounds.
on_custom_stylesheet_changed() would set properties_computed to FALSE
without freeing the old properties, then the properties pointer would
be overwritten in ensure_properties().
Florian Müllner [Thu, 26 May 2016 20:20:50 +0000 (22:20 +0200)]
loginManager: Extend canSuspend() callback
The underlying logind API does not only indicate whether suspend is
available, but also whether the user is eligible for executing the
operation without further authentication. This information can be
relevant, so pass it to the callback.
Michele Gaio [Wed, 4 Nov 2015 00:56:16 +0000 (00:56 +0000)]
AppIconMenu: properly destroy on source destroy.
If the source actor is destroyed while the popupMenu is shown -- this
can happen if a non favorite application was closing or crashes -- the
menu actor is improperly destroyed.
This makes the popupMenu close first and does a clean ungrab instead.
Florian Müllner [Thu, 19 May 2016 14:36:46 +0000 (16:36 +0200)]
windowManager: Avoid code duplication
The various switcher keybindings are handled identically, except for
the popup that is shown; update the code to reflect that instead of
duplicating the code again and again.
Florian Müllner [Thu, 19 May 2016 12:41:24 +0000 (14:41 +0200)]
altTab: Take over cycle-windows/cycle-group keybindings
The code to handle cycling through windows without showing a popup
was removed from mutter a while ago, which left the corresponding
keybindings mostly broken (i.e. they now only switch between two
windows). With the various switch-foo keybindings handled by the
shell, it is now easier to take over the cycle-foo keybindings as
well.
Martin Szulecki [Tue, 17 May 2016 13:00:04 +0000 (15:00 +0200)]
st: Init framebuffer early to fix gnome-shell crash on NVIDIA drivers
Checking offscreen for COGL_INVALID_HANDLE is not sufficient,
as cogl_offscreen_new_with_texture doesn't initialize framebuffer
objects but lets Cogl solve this the lazy way.
cogl_offscreen_new_with_texture will never return COGL_INVALID_HANDLE
anyways.
Florian Müllner [Thu, 12 May 2016 13:08:21 +0000 (15:08 +0200)]
st: Use case-insensitive shortcuts
For shortcuts that involve a letter (like <ctrl>c), we currently only
accept the lower-case variant. This makes shortcuts awkward to use when
caps-lock is active, and is inconsistent with GTK+, so accept upper-case
variants as well.
Florian Müllner [Thu, 12 May 2016 15:35:47 +0000 (17:35 +0200)]
build: Set rpath on more executables
We need to point executables to our private cogl/clutter forks.
Commit 093fd54e2 did this for the main executable, but forgot
the extension-prefs tool and other helpers.
Victor Toso [Thu, 12 May 2016 07:25:49 +0000 (09:25 +0200)]
ScreenShield: set LockedHint property from systemd
Logind recently got support for a hint property in Session Object to
inform if session is Locked or not. It is up to desktop environments
to keep this property up to date.
Florian Müllner [Tue, 10 May 2016 19:15:36 +0000 (21:15 +0200)]
app: Consider minimized windows for app comparisons
We used to take window visibility into account when comparing apps
until commit 1dfc38d078, following changes in the window switcher
due to auto-minimization. However auto-minimization was abolished
and the window switcher changes reverted, so it makes sense again
to sort apps without non-minimized windows last again.
We now link to cogl/clutter forks in a private location, so make
sure we set the rpath of executables to point the runtime linker
to the correct location.
Marek Chalupa [Thu, 31 Mar 2016 12:26:06 +0000 (14:26 +0200)]
dnd: Cancel the animation on drag actor destruction
If the drag actor is destroyed before the animation
callback is called, the callback is never called and
we're sticked with dnd grabing the events after we
dropped the target.
system: Only show rotation lock when a builtin output is present
We currently show the orientation lock button when an accelerometer
is present, however gnome-settings-daemon's xrandr plugin only applies
rotation when a builtin monitor is present. Update the button's
visibility to match gnome-settings-daemon.
While CoglError is a define to GError, it doesn't follow the convention
of ignoring errors when NULL is passed, but rather treats the error as
fatal :-(
That's clearly unwanted for a compositor, so make sure to always pass
an error parameter where a runtime error is possible